package com.anwen.mongoa.entity;

import com.anwen.mongo.annotation.ID;
import com.anwen.mongo.annotation.collection.CollectionName;
import com.anwen.mongo.enums.IdTypeEnum;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;

/**
 * <p>
 * 环境监测
 * </p>
 *
 * @author 曾有
 * @since 2023-12-22
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
@CollectionName(value = "environment")
public class Environment {

    @ID(type = IdTypeEnum.ASSIGN_ULID)
    private String id;

    /**
     * 时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime time;

    /**
     * 温度(℃)
     */
    private Double temperature;

    /**
     * 湿度(%RH)
     */
    private Double humidity;

    /**
     * 甲烷(ppm)
     */
    private Double ch4;

    /**
     * 丙烷(ppm)
     */
    private Double propane;

    /**
     * 烟雾(ppm)
     */
    private Double smoke;

    /**
     * 一氧化碳(ppm)
     */
    private Double co1;

    /**
     * 硫化物(ppm)
     */
    private Double sulfide;

    /**
     * 煤气(ppm)
     */
    private Double gas;

    /**
     * 等级（0：优，1：轻度污染，2：严重污染）
     */
    private Integer grade;

    /**
     * 预警（0：否，1：是）
     */
    private Integer warn;

    /**
     * 预警信息
     */
    private String msg;

    /**
     * robot id
     */
    private Integer robotId;

    /**
     * robot name
     */
    private String robotName;

    /**
     * group id
     */
    private Long groupId;

}
